#ifndef __GLOBAL__
#define __GLOBAL__

#define BOARD_A                            0
#define BOARD_B                            1

typedef unsigned char  bool;
typedef unsigned char  uint8;
typedef signed   char  int8;
typedef unsigned int   uint16;
typedef signed   int   int16;
typedef unsigned long  uint32;
typedef signed   long  int32;

#define delay_n_us(n) \
    do{\
	      uint32 i;\
	      for(i = 0; i < n; i++) asm("nop");\
	}while(0)


#define LED_RED_ON() PORTB&=0xDF
#define LED_RED_OFF() PORTB|=0x20
#define LED_YELLOW_ON() PORTB&=0xBF
#define LED_YELLOW_OFF() PORTB|=0x40
#define LED_GREEN_ON() PORTB&=0x7F
#define LED_GREEN_OFF() PORTB|=0x80

void init_devices(void);
void delay_n_ms(unsigned int n);

#define True  1
#define False 0

#endif